package study.spring.mvc.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 为什么 _1_SimpleController 要继承 Controller？
 * 因为 SimpleUrlHandlerMapping 对应的处理器是 HandlerAdapter 的子实现类 SimpleControllerHandlerAdapter
 */
@Slf4j
@Controller("simpleController")
public class _1_SimpleController implements org.springframework.web.servlet.mvc.Controller {

    @Override
    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
        log.info("fadsfasdf");
        return null;
    }
}
